<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <div v-once>{{ count }}</div>
      <button v-on:click="change()">改变内容</button>
      <button @mouseover="change()">改变内容</button>
      <button @click="one($event), two()">点我</button>

      <a :href="url" @click.prevent.stop="change()">
        超链接
        <span @click.stop.prevent="one()">1111111</span>
      </a>
    </div>

    <script src="../vue3.2.45.js"></script>
    <script>
      const app = Vue.createApp({
        data() {
          return {
            count: 1,
            url: "index.html",
          };
        },
        methods: {
          change: function () {
            this.count++;
          },
          one(event) {
            console.log(event);
            console.log("第一个事件处理器逻辑...");
          },
          two(event) {
            console.log(event);
            console.log("第二个事件处理器逻辑...");
          },
        },
      });

      const vm = app.mount("#app");
    </script>
  </body>
</html>
